//
// Created by 28365 on 2025/3/5.
//

#include "../include/obj/UpdateRecord.h"

int UpdateRecord::getVersion() const {
    return version;
}

void UpdateRecord::setVersion(int _version) {
    UpdateRecord::version = _version;
}

int UpdateRecord::getNotCompletedVersion() const {
    return notCompletedVersion;
}

void UpdateRecord::setNotCompletedVersion(int _notCompletedVersion) {
    notCompletedVersion = _notCompletedVersion;
}

const std::set<int64_t> &UpdateRecord::getResId() const {
    return resId;
}

void UpdateRecord::setResId(const std::set<int64_t> &_resId) {
    UpdateRecord::resId = _resId;
}

bool UpdateRecord::hasNotCompleted() const{
    return notCompletedVersion != 0;
}

UpdateRecord::UpdateRecord(int version, int notCompletedVersion, const std::set<int64_t> &resId) : version(version),
                                                                                                notCompletedVersion(
                                                                                                        notCompletedVersion),
                                                                                                resId(resId) {}

UpdateRecord::UpdateRecord() = default;
